#include <assert.h>
#include "storageao_factory.h"
#include "storageao_stub4web.h"
#include "storageao_stub4app.h"
//#include "storageao.h"

using namespace erp::storage::ao;

bool CStorageAoFactory::s_StorageAoInit = false;

IStorageAo* CStorageAoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CStorageAoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_StorageAoInit)
        {
            int iRetCode = CStorageAo::Initialize();
            assert(iRetCode == 0);
            s_StorageAoInit = true;
        }   	
        return (new CStorageAo);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IStorageAoAsyc* CStorageAoFactory::GetAsycObject()
{
	return (new CStorageAoStub4App);
}
